<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>博客后台</title>
    <link rel="stylesheet" type="text/css" href="{P}/css/app.css" />
    <script type="text/javascript" src="{P}/js/app.js"></script>
</head>
<body>
<div class="wrapper">
    <!-- START HEADER -->
    {include file='../Public/header.html'}
    <!-- END HEADER -->

    <!-- START MAIN -->
    <div id="main">
        <!-- START SIDEBAR -->
        {include file='../Public/sidebar.html'}
        <!-- END SIDEBAR -->

        <!-- START PAGE -->
        <div id="page">
            <!-- start page title -->
            <div class="page-title">
                <div class="in">
                    <div class="titlebar">	<h2>博文管理</h2>	<p>编辑博文</p></div>

                    <div class="clear"></div>
                </div>
            </div>
            <!-- end page title -->

            <!-- START CONTENT -->
            <div class="content">
                <div class="simplebox grid740" style="z-index: 720;">
                    <div class="titleh" style="z-index: 710;">
                        <h3>编辑博文</h3>
                    </div>
                    <div class="body" style="z-index: 690;">

                        <form id="form2" name="form2" method="post" action="index.php?p=admin&a=article&a=update">
                            <input type="hidden" name="id" value="{$article.id}"/>
                            <div class="st-form-line" style="z-index: 680;">
                                <span class="st-labeltext">标题</span>
                                <input name="a_title" type="text" class="st-forminput" style="width:510px" value="{$article.a_title}">
                                <div class="clear" style="z-index: 670;"></div>
                            </div>
                            <div class="st-form-line" style="z-index: 640;">
                                <span class="st-labeltext">分类</span>
                                <select class="uniform" name="c_id">
                                    {foreach $smarty.session.categories as  $cat}
                                    <option value="{$cat.id}"{if $cat.id eq $article.c_id} selected="selected"{/if}  >{str_repeat('----',$cat.level)}{$cat.c_name}</option>
                                    {/foreach}
                                </select>
                                <div class="clear"></div>
                            </div>
                            <div class="st-form-line">
                                <span class="st-labeltext">状态</span>
                                <select class="uniform" name="a_status">
                                    <option value="1" {if $article.a_status eq 1}selected="selected"{/if}>草稿</option>
                                    <option value="2" {if $article.a_status eq 2}selected="selected"{/if}>公开</option>
                                    <option value="3" {if $article.a_status eq 3}selected="selected"{/if}>隐藏</option>
                                </select>
                                <div class="clear"></div>
                            </div>
                            <div class="st-form-line" style="z-index: 620;">
                                <span class="st-labeltext">置顶</span>
                                <label class="margin-right10">
                                    <div class="radio">
                                        <span><input type="radio" name="a_toped" class="uniform" value="1" {if $article.a_toped eq 1}checked="checked"{/if}></span>
                                    </div> 置顶
                                </label>
                                <label class="margin-right10">
                                    <div class="radio">
                                        <span><input type="radio" name="a_toped" class="uniform" value="2" {if $article.a_toped eq 2}checked="checked"{/if}></span>
                                    </div> 不置顶
                                </label>

                                <div class="clear" style="z-index: 610;"></div>
                            </div>
                            <div class="st-form-line">
                                <span class="st-labeltext">图片</span>
                                <img src="{$article.a_img}">
                                <div class="clear"></div>
                            </div>
                            <div class="st-form-line">
                                <span class="st-labeltext">新图片</span>
                                <input type="file" name="a_img">
                                <div class="clear"></div>
                            </div>

                            <!-- START jWYSIWYG TEXT EDITOR -->
                            <div class="simplebox grid740">
                                <div class="titleh">
                                    <h3>内容</h3>
                                </div>
                                <div class="body">
                                    <textarea class="st-forminput" rows="5" cols="47" name="a_content" style="width:96.5%;">{$article.a_content}</textarea>
                                </div>

                            </div>
                            <!-- END jWYSIWYG TEXT EDITOR -->

                            <div class="button-box" style="z-index: 460;">
                                <input type="submit"  id="button" value="提交" class="st-button">
                            </div>
                        </form>

                    </div>
                </div>
            </div>
            <!-- END CONTENT -->
        </div>
        <!-- END PAGE -->
        <div class="clear"></div>
    </div>
    <!-- END MAIN -->

    <!-- START FOOTER -->
    {include file='../Public/footer.html'}
    <!-- END FOOTER -->
</div>
</body>
</html>